<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class InitUpdate35 extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('order_skus', function (Blueprint $table) {

            $table->json('sku_assets')->nullable()->comment('绑定的虚拟资产'); 
            $table->json('reward_assets')->nullable()->comment('下单奖励虚拟资产'); 

        });

        Schema::table('asset_records', function (Blueprint $table) {

            $table->string('order_number', 50)->nullable()->comment('订单编号'); 
            $table->integer('package_sku_id')->nullable()->comment('奖品id'); 
            $table->string('package_sku_sid', 50)->nullable()->comment('奖品sid'); 
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('order_skus', function (Blueprint $table) {

            Schema::dropIfExists('sku_assets');
            Schema::dropIfExists('reward_assets');
            
        });

        Schema::table('asset_records', function (Blueprint $table) {
            Schema::dropIfExists('order_number');
            Schema::dropIfExists('package_sku_id');
            Schema::dropIfExists('package_sku_sid');
        });
    }
}
